home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / doors_2 / sread100.zip / SREAD.DOC < prev    next >
Text File  |  1992-08-14  |  14KB  |  305 lines

  1. Sread Version 1.00 Documentation:
  2.  
  3. LEGAL STUFF:
  4.  
  5. I am responsible for NOTHING!  You are using this system totally at your
  6. own risk!  There is only one file that I write to at this time and that
  7. is the answers file.  All other files are simply either not used or read
  8. only! User takes sole responsibility for security and safety of any data
  9. while using this program.
  10.  
  11. Sread is not in the Public Domain. It is shareware. This means that you
  12. are free to copy it, upload it to bulletin boards, and share it with
  13. friends so long as no modification is made to the files contained in
  14. this archive but you must either register it or stop using it after
  15. thirty (30) days. No changes made be made to the contents or archive
  16. except as required to accommodate the default archive format of a
  17. particular BBS. No -AV's or ads for any BBS may be placed on, or in,
  18. this archive without the express permission of the author.
  19.  
  20. Files in this archive are:
  21.  
  22. SREAD.EXE     <- The main program
  23. SREAD.DOC     <- This file
  24. EXAMPLE1      <- Batch File used to run the door with DOOR.SYS
  25. EXAMPLE2      <- Batch File used to run the door with PCBOARD.SYS
  26. SREAD.QES     <- Sample script file covering two possible scripts
  27. SREAD.ANS     <- Sample response file
  28. REGISTER.FRM  <- Registration form
  29. FILE_ID.DIZ   <- Description file
  30.  
  31. SREAD GENERAL INFORMATION:
  32.  
  33. All lines start with a some form of formatting information or that line will
  34. be considered to be the question that you want to ask.  The script format
  35. is totally compatible with PCBoard's script file while adding ProScript
  36. compatibility and my extensions via my own script commands using the
  37. D²Script(tm) language.  This is basically a full featured multiple
  38. script door.
  39.  
  40. Version 1.00 still does not have all the formatting information handlers,
  41. but has most everything else taken care of.  There is still a known bug
  42. if you are using the PCBOARD.SYS version, it does not seem to grab the
  43. phone numbers.  I am looking into this. In the meantime, those using PCB
  44. 14.5 should make a DOOR.SYS file for this door and older PCB (14.0, 1, or
  45. 2) should use a converter such as PDFC by Kevin Carr.
  46.  
  47. PCBOARD COMPATIBLE FORMAT INFORMATION:
  48.  
  49. ;  Lines that start with a semicolon are all treated as displayed lines
  50.    but the semicolon is not displayed.  There is nothing done with the
  51.    line, as it is only displayed.
  52.  
  53. PROSCRIPT COMPATIBLE FORMAT INFORMATION:
  54.  
  55. \  All lines that start with this symbol will be treated as a input
  56.    formatting string.  These are the ProScript extensions and I have
  57.    tried to remain totally compatible with them.  They are fully
  58.    documented in the ProScript documentation.
  59.  
  60.    ProScript extensions:
  61.  
  62.        \?      ;require Y or N response
  63.        \#      ;require numeric response
  64.        \$      ;require any character as response
  65.        \_      ;optional but allowed response
  66.  
  67.  
  68. SREAD FORMAT EXTENSIONS:
  69.  
  70. !  These lines are considered to be comments.  They are not displayed nor
  71.    are they written to the answer file.
  72.  
  73. ]  This line will be written to the answer file.  This will not be displayed
  74.    but will be written to the answer file.
  75.  
  76. %  This line will be written to the answer file and displayed.  You may use
  77.    any valid variables in this line.
  78.  
  79. $  This indicates that this is a label.  The label must be on a line by
  80.    itself and be the first thing on the line (at the leftmost margin).
  81.  
  82. ^  This is a command line and indicates a D²Script(tm) command.  The
  83.    commands are not case sensitive, so you may enter them in lowercase
  84.    if you want but recommend uppercase for readability.  The following
  85.    D²Script(tm) commands are currently supported:
  86.  
  87.  
  88.         ABORT                          This will make the system handle the
  89.                                        times when a user does NOT finish a
  90.                                        script file.
  91.  
  92.         ADJUST                         This will reset the "starting" pointer
  93.                                        so that if you want to save part of
  94.                                        your script, but may later need to
  95.                                        ^ABORT from this point on.
  96.  
  97.         ADJ|{level adjustment}         +level will increment the user level
  98.                                        by the specified amount.
  99.                                        -level will decrement the user level
  100.                                        by the specified amount.
  101.                                        level will set the user level to
  102.                                        the specified amount.
  103.  
  104.         ACP|{Acceptance question}      Accept the information presented.  If
  105.                                        the users enters anything other than
  106.                                        YES or Y they will exit the door.
  107.  
  108.         ASK|{LINES}                    Ask for a number of lines of text. It
  109.                                        will end when you either enter the
  110.                                        requested number of lines or press
  111.                                        enter making a blank line.
  112.  
  113.         CHG|{filename}                 Change the answer file.  This is used
  114.                                        to change only the answer file and
  115.                                        not both script and answer files.
  116.  
  117.         CLS                            This will clear the screen.
  118.  
  119.         DEL|{filename}                 Delete this file.
  120.  
  121.         DSP|{filename}                 Display a file (G will be appended if
  122.                                        the user is in the graphics mode.
  123.  
  124.         END                            Force an exit from the script.  This
  125.                                        will leave the script.
  126.  
  127.  
  128.         JMP|{$LABEL}|{Yes question}    This will make your script file jump
  129.                                        to the label if there is a negative
  130.                                        response.
  131.  
  132.  
  133.         JPP|{$LABEL}                   Force a jump to the label.  There is
  134.                                        no response needed from the user. It
  135.                                        will just jump.
  136.  
  137.         GOSUB|{$LABEL}                 Call a label subroutine.  You will
  138.                                        need to use ^RETURN to get back to
  139.                                        continue on.  You may nest down
  140.                                        no more than 1000 levels.
  141.  
  142.         LVL|{MIN}|{MAX}|{$LABEL}       This will jump to label if the
  143.                                        security level is not in the range
  144.                                        of min and max.  Currently it only
  145.                                        works with DOOR.SYS files.
  146.  
  147.         MUL|{$LABEL}|{$LABEL}|{$LABEL} Up to ten labels may be used.  I would
  148.                                        strongly suggest following this line
  149.                                        with some sort of ^JPP| as the command
  150.                                        will fall through if there is no
  151.                                        valid response returned.
  152.  
  153.         NEW|{SCRIPT.QES}|{SCRIPT.ANS}  This will make the system react as
  154.                                        though you are just starting with
  155.                                        a new script file.  This command
  156.                                        will loose your ^GOSUB| nestings.
  157.  
  158.         PAUSE                          This is used when you want to pause
  159.                                        a script.  It will present a message
  160.                                        to the user to press any key.
  161.  
  162.         RETURN                         Returns from the most frequent gosub.
  163.                                        You may nest any number of levels
  164.                                        down.  (Arbitrary limit is 1000)
  165.  
  166.         RTRN|{level}                   Will set the DOS error_level for
  167.                                        when you exit the door.  Unless there
  168.                                        is an error in the door, this value
  169.                                        will be returned.  Levels 1 - 30
  170.                                        are reserved for Sread.
  171.  
  172.         RUN|{complete DOS line}        This will cause your script to end,
  173.                                        and then execute this command as
  174.                                        though you typed it at the command
  175.                                        line.  If you are inside of a batch
  176.                                        file, you will return back to next
  177.                                        line in the batch file directly
  178.                                        after the call to sread.
  179.  
  180.         SHL|{complete DOS line}        This will have sread SHELL out to
  181.                                        DOS, retaining sread in memory.
  182.                                        You should try to minimize the
  183.                                        amount of memory that you need,
  184.                                        as sread is still in memory.
  185.  
  186.         UPPER                          This is used to force all information
  187.                                        that is written to the answer file
  188.                                        will be forced to upper case.  When
  189.                                        you use ^CHG or ^NEW this will be
  190.                                        reset to the normal mode.
  191.  
  192.         UPPEROFF                       Turns off the ^UPPER command.
  193.  
  194.         WRITEOFF                       Disable writing to the answer files.
  195.                                        All writing to the answer files will
  196.                                        be disabled until the ^WRITEON
  197.                                        command.  When you use ^CHG or ^NEW
  198.                                        this will be reset to the normal mode.
  199.  
  200.         WRITEON                        Renables writing capabilities that
  201.                                        was disabled with the WRITEOFF
  202.                                        command.  This only needs to be
  203.                                        used after the WRITEOFF command.
  204.  
  205.  
  206. REPLACEABLE VARIABLES CURRENTLY SUPPORTED:
  207.  
  208.         @NUMCALLS@      Caller number
  209.         @BPS@           Connect Speed
  210.         @CITY@          City of the caller
  211.         @DATAPHONE@     Data phone number
  212.         @EXPDATE@       Expiration Date
  213.         @FIRST@         First name with the first letter Capitalized
  214.         @HOMEPHONE@     Home phone number
  215.         @LASTDATEON@    Last Date On
  216.         @LASTTIMEON@    Last Time On
  217.         @NUMTIMESON@    Number of Times on
  218.         @SECURITY@      Security Level
  219.         @USER@          Users full name
  220.  
  221. @Xyz variables:
  222.  
  223.     Background (y)  (blinking)        Foreground  (z)  (Bold)
  224.     ---------------------------------------------------------------------
  225.     Black     = 0       8              Black     = 0     8
  226.     Blue      = 1       9              Blue      = 1     9
  227.     Green     = 2       A              Green     = 2     A
  228.     Cyan      = 3       B              Cyan      = 3     B
  229.     Red       = 4       C              Red       = 4     C
  230.     Magenta   = 5       D              Magenta   = 5     D
  231.     Yellow    = 6       E              Yellow    = 6     E
  232.     White     = 7       F              White     = 7     F
  233.     ---------------------------------------------------------------------
  234.  
  235.     This information is included only to show how PCBoard uses the @X
  236.     variables.  Clark Development has created this format.  I do NOT
  237.     claim any rights to this format.  Also, I do NOT support the @X00
  238.     or @XFF commands in this release.
  239.  
  240.     @X00 - Save the current color
  241.     @XFF - Restore the saved color
  242.  
  243. SETUP:
  244.  
  245. Setup of Sread Version 1.00 is very simple.  Create a directory for the
  246. files somewhere on your system.  You will then have to use a batch file
  247. (Examples included) to run the door.  There are a number of parameters
  248. that need to be given to the door.  They are as follows:
  249.  
  250. SREAD DOOR.SYS USERS SREAD.QES SREAD.ANS {option1} {option2}
  251.  
  252. DOOR.SYS can be replaced with PCBOARD.SYS if your system does not support
  253. DOOR.SYS files.
  254.  
  255. USERS is the name and path to your users file.
  256.  
  257. SREAD.QES is the name of the script file.
  258.  
  259. SREAD.ANS is the answers file for the script question.
  260.  
  261. Options:
  262.    
  263.      /debug - used to debug your scripts.  Will create an output of
  264.               the commands as they happened.
  265.  
  266.      /slow  - Disable the smart ansi system.  This will make the ansi
  267.               output about 25% slower.  Turns of abbreviated ansi
  268.               color codes.
  269.  
  270.      $LABEL - A label to start executing at in a script.
  271.  
  272.  
  273. Error Levels Currently defined:
  274.      
  275.      1   Unable to open BBS system file (pcboard.sys,door.sys etc)
  276.      2   Problem reading BBS system file
  277.      3   Unrecognized BBS file type
  278.      4   Unable to open pcboard USERS file
  279.      5   Invalid User record or problem seeking to user record
  280.      6   Problem reading USER record
  281.      7   PORT command syntax error
  282.      8   Fossil driver specified but no Fossil driver installed
  283.      9   Memory allocation problem
  284.  
  285.     10   Script file not found
  286.     11   Unable to open answer file
  287.     12   Malloc failure
  288.     13   Refusal through ^ACP (See documentation for more details)
  289.     14   Calloc failure
  290.     15   Undefined Door open failure
  291.     16   Possible virus infection
  292.  
  293.     30   ^RUN command used
  294.     
  295.     17 -  29 Reserved for SRead
  296.     
  297.     31 - 255 Available for ^RTRN command
  298.  
  299. Acknowledgements:
  300.  
  301.      PCBoard is a registered trademark of Clark Development Company, Inc
  302.      ProScript is a registered trademark of Samuel H. Smith.
  303.      PDFC is a trademark of Kevin Carr.
  304.      D²Script is a trademark of D²Software.
  305.